import java.util.*;
public class MaximumNumberFormed{
public static void main(String[] args)
{
    Integer arr[] = {90,99,100};
    String[] arrString = new String[arr.length];
    StringBuilder finalString = new StringBuilder();
    for(int i = 0; i < arr.length; i++)
    {
        arrString[i] = Integer.toString(arr[i]);
        StringBuilder temp = new StringBuilder(arrString[i]);
        finalString = finalString.append(temp);
    }
    System.out.println(finalString);
    char[] finalArray = new char[finalString.length()];
    finalString.getChars(0,finalString.length(),finalArray,0);
    for(int i = 0; i < finalArray.length; i++)
        System.out.print(finalArray[i]);
    System.out.println();
    Arrays.sort(finalArray);

    for(int i = finalArray.length-1; i > -1; i--)
        System.out.print(finalArray[i]);
    String finalAnswer = new String(finalArray);
    StringBuffer finalAnswer1 = new StringBuffer(finalAnswer);
    finalAnswer1.reverse();
    String converted = new String(finalAnswer);
    
    System.out.println("Nmeric value = "+ Integer.valueOf(converted));

    
}
}
